
1、尝试创建detect.py 并实现功能调用

import requests


# 1. url
detect_url = 'https://api-cn.faceplusplus.com/facepp/v3/detect'


# 2. api账户/通行证
API_key = '5E5V4cXjdk_y_Fnoa2gIo6Rn2qj5NYjz'
API_sercret = 'YlXvJybg0abyNg5bBfISXxjgg417dfhZ'

# 3. 请求方法：POST

# 4. 准备payload（酬载）
payload = {
    'api_key':API_key,
    'api_secret':API_sercret,
    'image_url':'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_bt%2F0%2F13483492992%2F1000.jpg&refer=http%3A%2F%2Finews.gtimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1651284724&t=3c91f348d47f970498d2242ed823ad25'

}

# 5. 发起请求
r = requests.post(url = detect_url, params = payload)

